export const getRoleList = (params) => {
  return http({
    method: "GET",
    url: `/api-user/roles`,
    params,
  });
};

export const getAllRoleList = (params) => {
  return http({
    method: "GET",
    url: `/api-user/allRoles`,
    params,
  });
};

export const addRole = (data) => {
  return http({
    method: "post",
    url: `/api-user/roles/saveOrUpdate`,
    data,
  });
};

export const editRole = (data) => {
  return http({
    method: "post",
    url: `/api-user/roles/saveOrUpdate`,
    data,
  });
};

export const deleteRole = (params) => {
  return http({
    method: "delete",
    url: `/api-user/roles/${params.id}`,
  });
};

